<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>员工管理</title>
	<link rel="stylesheet" type="text/css" href="ui/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="ui/themes/icon.css">
	<script type="text/javascript" src="ui/jquery.min.js"></script>
	<script type="text/javascript" src="ui/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="ui/locale/easyui-lang-zh_CN.js"></script>
	<script type="text/javascript" src="ui/jquery.serializejson.min.js"></script>
	<script type="text/javascript" src="js/crud.js"></script>
	<script type="text/javascript" src="js/date.js"></script>
	<script type="text/javascript">
        var name="emp";
        var columns=[[
            {field:'uuid',title:'编号',width:100},
            {field:'username',title:'登陆名',width:100},

            {field:'name',title:'真实姓名',width:100},
            {field:'gender',title:'性别',width:100,formatter:function(value){
                    if(value==1){
                        return '男';
                    }
                    if(value==0){
                        return '女';
                    }
                }},
            {field:'email',title:'EMAIL',width:100},
            {field:'tele',title:'电话',width:100},
            {field:'address',title:'地址',width:100},
            {field:'birthday',title:'出生年月日',width:100,formatter:function(value){
                    return new Date(value).Format('yyyy-MM-dd');
                }},
            {field:'dep',title:'部门',width:100,formatter:function(value){
                    if(value!=null){
                        return value.name;
                    }
                }},

            {field:'-',title:'操作',width:200,formatter:function(value,row,index)
                {
                    return "<a href='#' onclick='edit("+row.uuid+")'>修改</a> <a href='#' onclick='dele("+row.uuid+")'>删除</a>";
                }}
        ]];

	</script>
</head>
<body>
<div class="easyui-panel">
	<form id="searchForm">
		登陆名：<input name="t1.username" >

		真实姓名：<input name="t1.name" >
		性别：

		<input name="t1.gender" type="radio" value="1">男
		<input name="t1.gender" type="radio" value="0">女
		<input name="t1.gender" type="radio" value="">全部

		EMAIL：<input name="t1.email" >
		电话：<input name="t1.tele" ><br>
		地址：<input name="t1.address" >
		出生年月日：
		<input name="t1.birthday" class="easyui-datebox" >至
		<input name="t2.birthday" class="easyui-datebox" >

		部门：<input name="t1.dep.uuid" class="easyui-combobox"
				  data-options="url:'dep_list.action',valueField:'uuid',textField:'name'" >

		<button type="button" id="btnSearch">查询</button>
	</form>
</div>
<table id="grid"></table>
<div id="editWindow" class="easyui-window" title="员工编辑"
	 style="width: 300px;height: 300px" data-options="closed:true">
	<form id="editForm">
		<input name="t.uuid" type="hidden">

		<table>
			<tr>
				<td>登陆名</td><td>
				<input name="t.username" class="easyui-validatebox"
					   data-options="required:true" missingMessage="登陆名必须填写"  > </td>
			</tr>
			<tr>
				<td>密码</td><td><input name="t.pwd"> </td>
			</tr>
			<tr>
				<td>真实姓名</td><td><input name="t.name"> </td>
			</tr>
			<tr>
				<td>性别</td>
				<td>
					<input name="t.gender" type="radio" value="1">男
					<input name="t.gender" type="radio" value="0">女
				</td>
			</tr>
			<tr>
				<td>EMAIL</td><td>
				<input name="t.email"
					   class="easyui-validatebox" data-options="required:true,validType:'email'"
					   invalidMessage="电子邮箱格式不正确" missingMessage="电子邮箱必须填写" >


			</td>
			</tr>
			<tr>
				<td>电话</td><td><input name="t.tele"> </td>
			</tr>
			<tr>
				<td>地址</td><td><input name="t.address"> </td>
			</tr>
			<tr>
				<td>出生年月日</td><td><input name="t.birthday" class="easyui-datebox" editable="false"> </td>
			</tr>
			<tr>
				<td>部门</td><td>
				<input name="t.dep.uuid" class="easyui-combobox"
					   data-options="url:'dep_list.action',valueField:'uuid',textField:'name',editable:false,required:true"
					   missingMessage="部门必须选择">
			</td>
			</tr>

		</table>
		<button id="btnSave" type="button">保存</button>
	</form>
</div>

</body>
</html>
